1. Field of Invention
The invention relates generally to a method and system for encoding data that is transmitted over a serial link.
2. Description of Related Art
Data in communication systems is often encoded before being serialized and transmitted over serial links. Encoding can increase the transition density of the serial stream and assure the DC-balance of the serial stream. Transition density refers to the rate of transitions from zero to one and from one to zero in the serial bit stream. A high rate of transition is required so that the electrical component receiving the serial stream can accurately recover the bits in the serial stream. The transitions aid the receiver in deducing the bit alignment of the serial stream. DC-balance refers to having an equal number of ones and zeros in the serial stream on average. Having DC-balance is helpful because optical lasers used for communication operate effectively when the serial stream they are transmitting is DC-balanced.
An example of a serial link encoding scheme is the 8B/10B encoding standard that is used in Gigabit Ethernet (GE). In this scheme, user data bytes are encoded into 10-bit values prior to being sent over the serial link. These 10-bit values are called data characters. A number of 10-bit control characters are defined to indicate control information in the data stream. Control characters are used in communication systems to indicate control information in the data stream such as the start of a data packet, the end of a data packet or that the communication link is not in use. Control characters can be differentiated from data characters, used to represent the user data, because the two types of characters take on different values. The 8B/10B encoding scheme assures DC-balance and good transition density when the data stream is serialized. The maximum run-length in 8B/10B encoding is five bits. A drawback to using the 8B/10B encoding scheme is the high bandwidth overhead incurred in the encoding process. The overhead of 8B/10B encoding is twenty-five percent. This high overhead wastes a large portion of the available bandwidth on the serial link.
Another serial link encoding scheme is the 64B/66B encoding scheme. It was developed as part of the ten Gigabit Ethernet (10GE) standard to convert four 8B/10B encoded data streams, each with a bit rate of 3.125 gigabits per second, into a single data stream with a bit rate of 10.3125 gigabits per second. Each of the 8B/10B encoded data streams has an overhead of twenty-five percent while the single 64B/66B data stream has an overhead of 3.125%. In the 64B/66B encoding scheme, scrambling and a guaranteed bit transition every 66 bits are used to ensure adequate transition density and DC-balance. Compared to the 8B/10B encoding scheme, the 64B/66B encoding scheme has lower overhead. The 64B/66B encoding scheme, however, has transition density and DC-balance properties that are not as good as the 8B/10B encoding scheme.
Another protocol with provisions for serializing a byte-wide data stream is the Synchronous Optical Network (SONET) standard. In SONET, a scrambling polynomial is applied to the data stream in order to achieve acceptable DC-balance and transition density. Important events in the data stream are indicated by overhead bytes. The overhead bytes are assigned particular locations within the fixed-size SONET frame. The SONET frames are delineated by a fixed-sequence of framing bytes. SONET has the advantage of not having any encoding overhead since scrambling is used and the overhead bytes are in fixed locations. However, because the overhead bytes must be present in each SONET frame, the overhead bytes do represent wasted bandwidth in frames where they are not used. In addition, SONET has a poorer guaranteed transition density compared to the 8B/10B and 64B/66B encoding schemes, and its DC-balance is not as good as that of the 8B/10B encoding scheme.
An exemplary embodiment of the invention is a method for encoding data into a 48B/50B format for transmission over a serial link. A data stream that includes characters is received and segmented into a six-character block. The block of six characters is translated into a 50-bit byte frame in 48B/50B format. A 48-bit word is created from the block of six characters by encoding the characters contained in the block. The 48-bit word is scrambled and a 2-bit synchronization sequence is appended to the scrambled 48-bit word. The result is the 50-bit byte frame in 48B/50B format. An alternate embodiment of the present invention includes a method for decoding data from the 48B/50B format. Further scope of applicability of the present invention will become apparent from the detailed description given hereinafter. However, it should be understood that the detailed description and specific examples, while indicating preferred embodiments of the invention, are given by way of illustration only, since various changes and modifications within the spirit and scope of the invention will become apparent to those skilled in the art from this detailed description.